function filpFunction(arr) {
    var newArray = [];
    for (var i = arr.length - 1; 0 <= i; i--) {
        newArray[newArray.length] = arr[i];
    }
    return newArray;
}
var re = filpFunction(['red', 'pink', 'blue', 'green', 'yellow'])
console.log(re);